/*
 * @ : Copyright (c) 2021 Phytium Information Technology, Inc. 
 *  
 * SPDX-License-Identifier: Apache-2.0.
 * 
 * @Date: 2021-09-14 10:12:20
 * @LastEditTime: 2021-09-15 18:23:37
 * @Description:  This files is for sdmmc global config implementation
 * 
 * @Modify History: 
 *  Ver   Who        Date         Changes
 * ----- ------     --------    --------------------------------------
 * 1.0   Zhugengyu   2021/8/6    init
 */
#include "parameters.h"
#include "f_sdmmc.h"

const FSdmmcConfig sdmmc_cfg_tbl[FSDMMC_HOST_INSTANCE_NUM] =
{
    [FSDMMC_HOST_INSTANCE_0] =
    {
        .instance_id = FSDMMC_HOST_INSTANCE_0,
        .base_addr   = FSDMMC_HOST_0_BASEADDR,
        .irq_num = 
        {
            [FSDMMC_CMD_INTR] = FSDMMC_HOST_0_CMD_INTR_IRQ,
            [FSDMMC_DMA_BD_INTR] = FSDMMC_HOST_0_DMA_INTR_IRQ,
            [FSDMMC_ERROR_INTR] = FSDMMC_HOST_0_ERR_INTR_IRQ
        },
        .enable_irq = 
        {
            [FSDMMC_CMD_INTR] = TRUE,
            [FSDMMC_DMA_BD_INTR] = TRUE,
            [FSDMMC_ERROR_INTR] = TRUE              
        },
        .irq_priority = 
        {
            [FSDMMC_CMD_INTR] = 0,
            [FSDMMC_DMA_BD_INTR] = 0,
            [FSDMMC_ERROR_INTR] = 0            
        },
        .irq_name = 
        {
            [FSDMMC_CMD_INTR] = "SDCI-CMD-IRQ",
            [FSDMMC_DMA_BD_INTR] = "SDCI-DMA-IRQ",
            [FSDMMC_ERROR_INTR] = "SDCI-ERR-IRQ"            
        }       
    }
};